import http from "@/utils/http2.js";
/**
 * 查询所有产品
 * @param {*} type
 * @returns
 */
export function queryAll() {
  return http.get("/v1/product/all");
}
/**
 * 分页查询
 * @param {*} data
 * @returns
 */
export function queryProduct(data) {
  return http.post("/v1/product/query", data);
}
/**
 * 查询产品分类
 * @param {*} type
 * @returns
 */
export function queryCategory() {
  return http.get("/v1/product/category");
}

export function queryCustomerProduct(data) {
  return http.post("/v1/product/cust", data);
}
// 产品详情
export function queryProductDetail(id) {
  return http.get("/v1/product/detail", { id });
}
// 浏览记录
export function productHistory(data) {
  return http.post("/v1/product/history", data);
}
// 浏览记录里的产品详情
export function productHistoryDetail(pid) {
  return http.get("/v1/product/historyDetail", { pid });
}
